package db8;

public class HourlyEmployee extends ColaEmployee{
    int hoursalary;
    int hour;
    public HourlyEmployee(){

    }
    public HourlyEmployee(String name,int bir,int hoursalary,int hour){
        super(name, bir);
        this.hoursalary=hoursalary;
        this.hour=hour;
    }
    public double getSalary(int month){
        double salary=0;
        if (hour>160){
            salary=(hour-160)*hoursalary+hoursalary*160;
        }else {
            salary = hoursalary * hour;
        }
        return salary;
    }
}
